package com.yhy.wxzn.wcs.device.rgv.enums;

import com.yhy.wxzn.wcs.device.rgv.bean.Node;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.List;

@Getter
@AllArgsConstructor
public enum ReversingDirection {
    顶升副通道("顶升副通道",1),
    副通道("下降副通道",2),
    主通道("主通道",3),
    未知("未知",-1);

    String des;
    int cmd;


    public static ReversingDirection getReversingDirection(List<Node> nodes){
        RunningDirection direct = RunningDirection.getDirect(nodes);
        if (RunningDirection.左.equals(direct) || RunningDirection.右.equals(direct))
            return 主通道;

        return 副通道;
    }
}
